(function() {
  var __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  define(['models/base/model'], function(Model) {
    'use strict';
    var UserModel, _ref;
    return UserModel = (function(_super) {
      __extends(UserModel, _super);

      function UserModel() {
        _ref = UserModel.__super__.constructor.apply(this, arguments);
        return _ref;
      }

      UserModel.prototype.urlRoot = window.AppData.API_URL + '/usuario';

      UserModel.prototype.toJSON = function() {
        var attrs;
        attrs = _.clone(this.attributes);
        if (attrs.password && !attrs.senha) {
          attrs.senha = attrs.password;
        }
        if (attrs.id) {
          delete attrs.senha;
        }
        delete attrs.password;
        delete attrs.id;
        delete attrs.ativo;
        return attrs;
      };

      return UserModel;

    })(Model);
  });

}).call(this);
